package com.example.mapper;

import com.example.entity.Talk;
import com.example.entity.User;
import com.example.entity.vo.TalkVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

@Mapper
@Repository
public interface TalkMapper {
    int deleteByPrimaryKey(Integer talkid);

    int insert(Talk record);

    int insertSelective(Talk record);

    Talk selectByPrimaryKey(Integer talkid);

    int updateByPrimaryKeySelective(Talk record);

    int updateByPrimaryKey(Talk record);

    CopyOnWriteArrayList<TalkVo> selectBytouser(Integer touser);

    List<User> selectByMyself(Integer touser);

    List<TalkVo> selectwhotowho(Integer touser, Integer fromuser);

    List<TalkVo> selectwhotowhowhenhasread(Integer touser, Integer fromuser);
}
